home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS Toolkit
/
BBS Toolkit.iso
/
qbbs
/
rabat.zip
/
FDRA.BAT
Wrap
DOS Batch File
|
1992-01-14
|
7KB
|
311 lines
@echo OFF
REM
REM
rem ... A FrontDoor/RemoteAccess batchfile by T. Graves - 159/500
rem ... set default drive here and before every questionable return to RA
rem ... in an interactive scenario like this, repeating the drive setting
rem ... is not overkill.
rem ... Note especially that this batch file may be restarted without the
rem ... modem being re-initialized at any point in the batch file where
rem ... there is a flag (ie: :HERE).
rem ... If an outside function fails, you may restart your user by typing:
rem ... FDRA RESTART-RA and that will bring the same user right back online.
rem ... Every routine in this batch file may be tested the same way.
REM
REM The Original Structures and Idea of this .BAT File
REM Are the Ideas by Tracy Graves
REM Tracy can be reached at FidoNet Node 1:159/500
REM Phone 1-517-337-0624
REM
REM This .BAT File was converted to work with the following programs:
REM Andrew Milner's - Remote Access 1.10+
REM David Nugent's - BNU
REM FrontDoor - By "In Dispute" - Sorry JoHo
REM Imail 1.21 - by I forget. Damn good program though.
REM Scan - MacAfee
REM DLC150.zip - Download Counter - I'll look it up in a minute
REM I Think That's it...
REM All Above mentioned programs are available on Delphi, in the BBS SIG
REM
REM
REM All Credit for this file should go to Tracy Graves from
REM the file RA-KIT1.ZIP, Which is (or will be shortly) in the BBS SIG also.
REM You should get the above mentioned file if you are new to setting up a
REM RA BBS. It just May save your sanity.
REM
cls
REM What drive is the System Using?
:C:
REM Don't Forget to set the Environment Variables
set RA=C:\RA
set FD=C:\FD
:START
REM OK Folks, Let's Get Busy!
REM Using David Nugent's BNU Fossil Driver Here.
REM Let's Give ourselves a little room to work.
BNU /R=1024 /T=512
REM OK, Now let BNU Toggle the port to make sure it's clear.
BNU /I1-
BNU /I1+ /F+
cls
REM Clear the Screen, Reset the Modem, and make sure it's On Hook
REM I Use Com2 Here and up ther in the BNU Statements
REM With BNU, COM1=0 (Default) , COM2=1, etc...
ECHO ATZ>COM2:
ECHO ATH0>COM2:
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo -------------- FrontDoor ---- RemoteAccess ------------------
:C:
cd \RA
:runfdra
cd \fd
FD
:AFTER-FD
REM Let's catch those ErrorLevels From FrontDoor
if errorlevel 238 goto 19200_BBS
if errorlevel 219 goto 19200_BBS
if errorlevel 196 goto 9600_BBS
if errorlevel 124 goto 2400_BBS
if errorlevel 112 goto 1200_BBS
if errorlevel 103 goto 300_BBS
if errorlevel 100 goto LOCALBBS
if errorlevel 90 goto SCANECHO
if errorlevel 80 goto TOSSNET
if errorlevel 70 goto UNPACKMAIL
if errorlevel 60 goto CLEANUP
if errorlevel 55 goto DAILY
if errorlevel 50 goto RA
if errorlevel 11 goto START
if errorlevel 10 goto END
if errorlevel 6 goto FOSSIL
if errorlevel 5 goto MODEMINIT
if errorlevel 4 goto MODEMRESP
if errorlevel 3 goto FULLDISK
if errorlevel 2 goto EXTERNAL
if errorlevel 1 goto INTERNAL
goto start
rem ***** FrontDoor executes BBS for human callers baud rate/errorlevels *****
:19200_BBS
:C:
cd\RA
RA.exe -n1 -b19200 -E0
goto AFTER-RA
:9600_BBS
:C:
cd\RA
RA.exe -n1 -b9600 -E0
goto AFTER-RA
:2400_BBS
:C:
cd\RA
RA.exe -n1 -b2400 -E0
goto AFTER-RA
:1200_BBS
:C:
cd\RA
RA.exe -n1 -b1200 -E0
goto AFTER-RA
:300_BBS
:C:
cd\RA
RA.exe -n1 -b300 -E0
goto AFTER-RA
:LOCALBBS
:C:
cd\RA
RA.exe -n1 -L -E0
goto AFTER-RA
:AFTER-RA
rem ***** AFTER_RA traps the errorlevel exits from RA *****
if errorlevel 20 goto OUTSIDE
if errorlevel 10 goto START
if errorlevel 5 goto NET&ECHO
if errorlevel 4 goto ECHOONLY
if errorlevel 3 goto NETONLY
if errorlevel 2 goto LOCALBBS
if errorlevel 1 echo INITIALIZATION ERROR! Modem Init failed or NO FOSSIL!
echo ATH1>COM2:
REM All this section does is to update the Files.BBS because of the
REM Weird way I use a CD-ROM
listem
call fbconv.bat
REM End Weird Stuff
goto END-RA
:rem Outside routines requiring exit from RA to run (saves RAM).
:rem Put stuff that exited ra with an errorlevel here!
:rem -===========================================================-
rem prevent accidental drop to DOS through batch
goto start
:OUTSIDE
if errorlevel 0 goto tuit
:tuit
prompt Outside_(exit returns)$p$g
c:\command.com
cd \RA
prompt $p$g
ctty con
goto restart-RA
:RESTART-RA
:C:
CD \RA
RA.exe -n1 -r
goto AFTER-RA
:NET&ECHO
:C:
cd \RA
Imail Scan
IMPACK 1:all 2:all via 1:3627/101
:ECHOONLY
:C:
cd \RA
Imail Scan
goto end-RA
:NETONLY
:C:
cd \RA
Imail Scan
IMPACK 1:all 2:all via 1:3627/101
goto end-RA
:END-RA
cls
cd\ra
goto start
:UNPACKMAIL
:C:
cd\RA
echo **** Unpacking mail; exit from FD errorlvl 70; F7 manually ****
IMAIL TOSS /N
rem IMAIL 1:all 2:all 3:all via 1:3627/101
IMTHINGS IMPORT
GOTO START
if not exist C:\netfiles\nodediff.* goto nexttest
:PARSE
echo ........... Nodediff found... Processing Nodelist ..........
cd \netfiles
for %%F IN (nodediff.???) Do Echo %%F Weekly Nodelist Change File >> \fidonet\files.bbs
cd \RA\nodelist
copy \netfiles\nodediff.* C:\RA\NODELIST
pkunpak/r \netfiles\nodediff.*
del \netfiles\nodediff.*
parselst
del nodediff.*
pkzip -m \fidonet\nodelist.zbs nodelist.bbs
:killist
cd \RA\nodelist
del nodelist.f*
killist
md temp
for %%F in (nodelist.???) do zip \nodelist\temp\%%F nodelist.???
cd temp
rename nodelist.??? nodelist.z??
for %%F in (nodelist.???) do echo %%F Weekly Compiled Nodelist "Zipped" >> \fidonet\files.bbs
copy nodelist.??? \fidonet
del nodelist.???
cd \RA
RAnode
cd \fd
fdnc
:nexttest
echo ........... Checking for received File Lists ...............
if not exist d:\netfiles\f3627_*.* goto nextst2
copy \netfiles\f3627_*.* \fidonet
del \netfiles\f3627_*.*
:nextst2
goto START
:TOSSNET
:C:
cd\RA
echo **** Toss net-mail; Manual exit from FD Errorlvl 80 ****
Imail Toss
goto START
:SCANECHO
:C:
cd\RA
echo ***** Echo Mail Scan; Manual exit from FD Errorlvl 90 *****
IMAIL SCAN
goto START
:SCAN
SCAN C: D: /A /M /REPORT C:\RA\LOGS\REPORT.TXT
GOTO START
:CLEANUP
:C:
cd\RA
echo **** Cleanup; Auto exit FD, 4am event FD Errorlvl 60 ****
RAmsg -L
RAmsg -Icru
RAmsg -PKRA
RAuser -V -S -P -D90 -M50
rem IMTHINGS KILL /D10 /N50 /P
:DAILY
echo * Special Daily Maintenance Routines *
:C:
cd\RA
SCAN C: D: /A /M
dlc150.exe
call logmaint.bat
goto start
rem ***** Some basic error codes in case we get in trouble *****
:FOSSIL
echo.
echo.
Echo Wrong Fossil Version Error|goto END
:MODEMINIT
echo.
echo.
Echo Unable To Initialize Modem|goto END
:MODEMRESP
echo.
echo.
Echo Modem Not Responding|goto END
:FULLDISK
echo.
echo.
Echo Insufficient Disk Space To Proceed|goto END
:EXTERNAL
echo.
echo.
Echo External Error - System File Missing|goto END
:INTERNAL
echo.
echo.
Echo Internal Error
:END
REM Take the phone Off the Hook when I'm trying to work in DOS.
echo ATH1>COM2:
cd \RA
echo.
echo.
echo.
echo.
echo.
echo ...... outta there!